#ifndef __SCNS_MALLOC_H__
#define __SCNS_MALLOC_H__

#include "ScnsConfig.h"

#if defined(SCNS_MALLOC_ENABLE)&&SCNS_MALLOC_ENABLE==1

#include "ScnsYing.h"

#if defined(__has_include)
#if __has_include("ScnsBspMalloc.h")

#include "ScnsBspMalloc.h"

#else
typedef enum
{
    SCNS_MALLOC_MAX,
}ScnsMallocEnum;
#endif
#else
#include "ScnsBspMalloc.h"
#endif

extern ScnsStatus scnsMallocInit(void);
extern void*scnsMalloc(ScnsSize size);
extern void*scnsFree(void*p);
extern void*scnsMallocFrom(ScnsMallocEnum malN,ScnsSize size);
extern void scnsMallocPrinDetail(void);
#if defined(SCNS_TIMER_ENABLE)&&SCNS_TIMER_ENABLE==1&&defined(SCNS_MEM_ENABLE)&&SCNS_MEM_ENABLE==1
extern void scnsMallocMemTest(const char name[],ScnsMallocEnum malI,const uint32 dataBias,const size_t size);
#endif
#endif
#endif
